import request from '@/utils/request'

export default {
  // 新增或编辑工作日志
  saveOrUpdate(dailylog){
    return request({
      url: `/dailylog/saveOrUpdate`,
      method: 'post',
      data: dailylog
    })
  },

  // 根据日期查询一周日志
  getList(weekDateTime){
    return request({
      url: `/dailylog/getList`,
      method: 'get',
      params: {weekDateTime}
    })
  },
  // /dailylog/getListByUserId/{userId}
  // 根据日期和用户id查询用户的一周日志
  getListByUserId(weekDateTime,userId){
    return request({
      url: `/dailylog/getListByUserId/${userId}`,
      method: 'get',
      params: {weekDateTime}
    })
  }
}
